package com.uchiha.nova.core.feign;

import com.uchiha.nova.core.model.dto.*;
import com.uchiha.nova.core.tool.constant.ApplicationConstant;
import com.uchiha.nova.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 周林静
 * @Date 2023-01-02,0002 19:07
 * @Version 1.0
 */
@FeignClient(value = ApplicationConstant.AUTH,configuration= FeignConfiguration.class)
public interface AuthFeignService {
    @PostMapping("/oauth/token")
    R getAccessToken(@RequestBody NovaOauthTokenDTO dto);
    @GetMapping("/kaptcha/render")
    Object getCode(String key);
    @GetMapping("/user/info/avue")
    R getWebUserInfoVO(@RequestParam Long id);
    @GetMapping("/user/navMenu/avue")
    R getNav(@RequestParam Long id);
    @PostMapping("/oauth/refresh_token")
    R refreshToken(@RequestBody RefreshTokenDTO refreshTokenDTO);
    @PostMapping("/user/passwordModify")
    R passwordModify(@RequestBody PasswordModifyDTO dto);

    @PostMapping("/user/tenant/init")
    void initTenant(@RequestBody TenantDTO tenantDTO);

    @GetMapping("/user/passwordEncode")
    R passwordEncode(@RequestParam String password);

    @PostMapping("/user/wechat/register")
    R wechatRegister(@RequestBody WechaterUserRegisterDTO dto);

    @GetMapping("/user/wechat/info")
    R getWeChaterInfo(@RequestParam Long userId);
}
